<?php
function test($doc)
{
	$doc['create_at'] = date('Y-m-d');
	$doc['age'] = $doc['age'] + 1;
	
	return $doc;
}
class ImportController extends ZendX_Controller_Action
{
	public function testAction()
	{
		if ($this->getRequest()->isPost()) 
    	{    		
			$excel =  PHPExcel_IOFactory::load($_FILES['file']['tmp_name']);			
		
			$sheetIndex = 0;
			$sheet = $excel->getSheet($sheetIndex);//getSheetByName('sheetName');
		
			$this->importExcel2Couchdb($sheet, array('A'=>'doctype', 'B'=>'name', 'C'=>'age', 'D'=>'_id'),2,'test');
    	}
		
	}
}